Method, terminal, and storage medium for tracking facial critical area

ABSTRACT

Method, terminal, and storage medium for tracking facial critical area are provided. The method includes accessing a frame of image in a video file; obtaining coordinate frame data of a facial part in the image; determining initial coordinate frame data of a critical area in the facial part according to the coordinate frame data of the facial part; obtaining coordinate frame data of the critical area according to the initial coordinate frame data of the critical area in the facial part; accessing an adjacent next frame of image in the video file; obtaining initial coordinate frame data of the critical area in the facial part for the adjacent next frame of image by using the coordinate frame data of the critical area in the frame; and obtaining coordinate frame data of the critical area for the adjacent next frame of image according to the initial coordinate frame data thereof.

RELATED APPLICATIONS

This application is a continuation application of PCT Patent ApplicationNo. PCT/CN2016/081631, filed on May 11, 2016, which claims priority toChinese Patent Application No. 201510922450.0, entitled “FACE KEY-POINTTRACKING METHOD AND APPARATUS” filed on Dec. 11, 2015, all of which isincorporated herein by reference in their entirety.

FIELD OF THE TECHNOLOGY

The present disclosure generally relates to the field of imageprocessing and facial recognition, and in particular, relates to amethod, apparatus, terminal, and storage medium for tracking facialcritical area.

BACKGROUND OF THE DISCLOSURE

Face tracking is a process for determining a movement trajectory andsize changes of a particular face in a video file or a video stream oran image sequence. Face tracking is of great significance in the fieldsof image analysis and image recognition. Robust adaptation and real-timeof a face tracking algorithm are two indicators that are difficult to besatisfied at the same time. This may be because, with an increase inrobust adaptation, complexity of the algorithm greatly increases. Whilebeing restricted by a limited processing capability of a computer,real-time of face tracking inevitably decreases.

In a video file or a video stream, to achieve a face tracking effect,face detection and facial critical area positioning need to be performedon each frame. Consequently, a face detection algorithm needs to consumeplenty of time, resulting in low tracking efficiency.

SUMMARY

One aspect of the present disclosure provides a facial critical areatracking method. The method includes accessing a frame of image in avideo file; obtaining coordinate frame data of a facial part in theimage by detecting a position of the facial part in the frame of theimage; determining initial coordinate frame data of a critical area inthe facial part according to the coordinate frame data of the facialpart; obtaining coordinate frame data of the critical area according tothe initial coordinate frame data of the critical area in the facialpart; accessing an adjacent next frame of image in the video file;obtaining initial coordinate frame data of the critical area in thefacial part for the adjacent next frame of image by using the coordinateframe data of the critical area in the frame; and obtaining coordinateframe data of the critical area for the adjacent next frame of imageaccording to the initial coordinate frame data of the critical area inthe adjacent next frame of image.

Another aspect of the present disclosure provides a terminal. Theterminal includes a memory, storing computer readable instructions, anda processor, coupled to the memory. The processor is configured for:accessing a frame of image in a video file; obtaining coordinate framedata of a facial part in the image by detecting a position of the facialpart in the frame of the image; determining initial coordinate framedata of a critical area in the facial part according to the coordinateframe data of the facial part; obtaining coordinate frame data of thecritical area according to the initial coordinate frame data of thecritical area in the facial part; accessing an adjacent next frame ofimage in the video file; obtaining initial coordinate frame data of thecritical area in the facial part for the adjacent next frame of image byusing the coordinate frame data of the critical area in the frame; andobtaining coordinate frame data of the critical area for the adjacentnext frame of image according to the initial coordinate frame data ofthe critical area in the adjacent next frame of image.

Another aspect of the present disclosure provides a non-transitorycomputer readable storage medium storing computer-executableinstructions for, when being executed, one or more processors to performa facial critical area tracking method. The method includes accessing aframe of image in a video file; obtaining coordinate frame data of afacial part in the image by detecting a position of the facial part inthe frame of the image; determining initial coordinate frame data of acritical area in the facial part according to the coordinate frame dataof the facial part; obtaining coordinate frame data of the critical areaaccording to the initial coordinate frame data of the critical area inthe facial part; accessing an adjacent next frame of image in the videofile; obtaining initial coordinate frame data of the critical area inthe facial part for the adjacent next frame of image by using thecoordinate frame data of the critical area in the frame; and obtainingcoordinate frame data of the critical area for the adjacent next frameof image according to the initial coordinate frame data of the criticalarea in the adjacent next frame of image.

Details of one or more embodiments of the present disclosure areprovided in the accompanying drawings and description below. Otherfeatures, objectives, and advantages of the present disclosure becomeobvious from the specification, the accompanying drawings, and theclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

To more clearly describe the technical solutions in the embodiments ofthe present disclosure or in the prior art, the following brieflydescribes the accompanying drawings. Apparently, the accompanyingdrawings in the following description show only some embodiments of thepresent disclosure, and a person of ordinary skill in the art may stillderive other drawings from these accompanying drawings without creativeefforts.

FIG. 1 is a schematic diagram of an exemplary terminal according tovarious embodiments of the present disclosure;

FIG. 2 is a flowchart of a facial critical area tracking methodaccording to various embodiments of the present disclosure;

FIG. 3 is a flowchart of an exemplary process for determining initialcoordinate frame data of a critical area in the facial part according tothe coordinate frame data of the facial part according to variousembodiments of the present disclosure;

FIG. 4 is a schematic diagram of an exemplary process for aligning acritical area with a coordinate frame of a facial part according tovarious embodiments of the present disclosure;

FIG. 5 is a schematic diagram of an exemplary process for zoomingcritical area according to various embodiments of the presentdisclosure;

FIG. 6 is a schematic diagram of an exemplary process for obtainingpositions of coordinates of points of five facial features according tovarious embodiments of the present disclosure;

FIG. 7 is a structural block diagram of an exemplary facial criticalarea tracking apparatus according to various embodiments of the presentdisclosure; and

FIG. 8 is a structural block diagram of another exemplary facialcritical area tracking apparatus according to various embodiments of thepresent disclosure.

DESCRIPTION OF EMBODIMENTS

To make the objective, technical solutions, and advantages of thepresent disclosure clear, the present disclosure is further described indetail with reference to the accompanying drawings and embodiments. Itshould be understood that, the specific embodiments described herein aremerely intended to explain the present disclosure, rather than to limitthe scope of the present disclosure.

Method, apparatus, terminal, and storage medium for tracking facialcritical area are provided to save time for face tracking and to improveface tracking efficiency.

FIG. 1 is a schematic diagram of an exemplary terminal according tovarious embodiments of the present disclosure.

As shown in FIG. 1, the exemplary terminal includes a processor, astorage medium, a memory, a network interface, an image collectiondevice, a display screen, a loudspeaker, and an input device, that areconnected by using a system bus. The storage medium of the terminalstores an operating system, and further includes a facial critical areatracking apparatus. The facial critical area tracking apparatus isconfigured to implement a facial critical area tracking method. Theprocessor is configured to provide computational and controlcapabilities to support operation of the entire terminal. The memory inthe terminal provides an environment for running of the facial criticalarea tracking apparatus in the storage medium. The network interface isconfigured to perform network communication with a server, for example,send a video file to the server, and receive a video file returned bythe server. The image collection apparatus of the terminal may collectan external image, for example, capture an image by using a camera.

The display screen may be a liquid crystal screen, an electronic inkdisplay screen, or the like. The input device may be a touch layercovered on the display screen, or may be buttons, a trackball, or atouchpad disposed on a housing of the terminal, or may be an externalkeyboard, touchpad, or mouse. The terminal may be a mobile phone, atablet computer, or a personal digital assistant. It may be understoodby a person skilled in the art that, the structure shown in FIG. 1 ismerely a structural block diagram of parts related to the solutions inthis application, and does not form a limitation to a terminal to whichthe solutions in this application are applied. A specific terminal mayinclude more or fewer components than those shown in the figure, or somecomponents may be combined, or the terminal has a different componentarrangement.

In various embodiments, the storage medium may include transitory andnon-transitory, removable and non-removable media that store informationsuch as computer readable instructions, data structures, programmodules, program apparatus, or other data and that are implemented byone or more processors. The computer-readable storage medium includes aRAM, a ROM, an EPROM, an EEPROM, a flash memory, or another solid statestorage technology, a CD-ROM, a DVD, or another optical storage, amagnetic cassette, a magnetic tape, a magnetic disk storage, or anothermagnetic storage device. In some cases, the system memory and thestorage medium depicted in FIG. 1 may be collectively referred to asmemories.

In one embodiment, a non-transitory computer readable storage medium maybe included in the present disclosure for storing computer-executableinstructions. When the computer-executable instructions are beingexecuted, hardware, such as one or more processors, may perform thedisclosed facial critical area tracking methods.

FIG. 2 is a flowchart of an exemplary facial critical area trackingmethod according to various embodiments of the present disclosure. Asshown in FIG. 2, a facial critical area tracking method may be performedon the terminal in FIG. 1, and may include the following.

In S202, accessing a frame of image in a video file.

For example, the video file may be an online video file or a video filedownloaded on the terminal. The online video file may be played whilebeing accessed. The video file downloaded on the terminal may also beplayed while being accessed.

When the video file is played, video images are played one frame afteranother, and each frame of image may be captured for processing. First,a particular frame of image in the video file is accessed forprocessing. The particular frame of image may be the first frame ofimage in the video file, or may be another frame of image.

In various embodiments, a plurality of frames of image may be includedand may form an image of the critical area of the facial part.Coordinate frame data of each of frames of image may be obtained.

In S204, detecting a position of a facial part in the frame of image, toobtain coordinate frame data of the facial part.

In one embodiment, the position of the face in the frame of image may bedetected by using a face detection process, to obtain the coordinateframe data of the facial part.

For example, in the face detection process, a position of a rectangularcoordinate frame of a facial part can be detected when an imageincluding a picture of the face is input.

The face detection process may include robust real-time face detection.Face detection process can be implemented by using Haar-like featuresand an AdaBoost algorithm. In this process, a facial part is representedby using Haar-like features, the Haar-like features are used fortraining to obtain a weak classifier, and multiple weak classifiers thatcan best represent the face are selected by using the AdaBoost algorithmto form a strong classifier, and several strong classifiers areconnected in series to form a cascaded classifier with a cascadedstructure, that is, a face detector. For each Haar-like feature, faceimage information of a reference frame and a field frame is considered.

Face detection process may also be implemented by using Multi-scaleBlock based Local Binary Patterns (MBLBP) features and an AdaBoostalgorithm. In this process, MBLBP features that can represent face imageinformation of a reference frame and eight field frames are used torepresent a face, and the MBLBP features are calculated by comparing anaverage gray level of the reference frame with respective average graylevels of the eight field frames.

Face detection process may also be implemented by using Multi-scaleStructured Ordinal Features (MSOF) and an AdaBoost algorithm. In thisprocess, MSOF features that can represent face image information of areference frame and eight field frames are used to represent a face,distances of the eight field frames relative to the reference frame areadjustable, and the reference frame and the eight field frames may notbe adjacent.

Face images and non-face images may also be collected and used as atraining sample set, and Flexible Block based Local Binary Patterns(FBLBP) features of the face images and the non-face images may beextracted to form an FBLBP feature set. The FBLBP features and aGentleBoost algorithm are used for training, to obtain a firstclassifier. The first classifier includes several optimal secondclassifiers, and each optimal second classifier is obtained throughtraining by using the GentleBoost algorithm. The first classifier is astrong classifier, and the second classifier is a weak classifier. Theweak classifiers are accumulated to obtain the strong classifier.Multiple layers of first classifiers are cascaded to form a facedetector. A position of the facial part in the first frame of image oranother frame of image is detected by using the face detector, to obtaina coordinate frame data of the facial part.

In various embodiments, a plurality of frames of image may be includedand may form an image of the critical area of the facial part.Coordinate frame data of each of frames of image may be obtained.

For coordinates of the face coordinate frame, a coordinate system iscreated by using a left upper corner of a screen of the terminal as acoordinate origin, and using a transverse direction as an X axis and alongitudinal direction as a Y axis. Without any limitations, thecoordinate system may also be created in another self-defined manner.

In S206, determining initial coordinate frame data of a critical area inthe facial part according to the coordinate frame data of the facialpart.

In an embodiment, as shown in FIG. 3, the determining of initialcoordinate frame data of the critical area in the facial part accordingto the coordinate frame data of the facial part includes the following.

In S302, aligning a pre-stored critical area with the coordinate frameof the facial part by shifting the pre-stored critical area with respectto the coordinate frame of the facial part.

For example, a center of pre-stored critical area may be aligned with acenter of the coordinate frame of the facial part by translating thepre-stored critical area with respect to or over the coordinate frame ofthe facial part.

For example, the pre-stored critical area may have a center, and thecoordinate frame of the facial part may also have a center. The centerof the pre-stored critical area is coincided with the center of thecoordinate frame data of the facial part. That is, the centers arealigned.

In S304, zooming the pre-stored critical area, so that a size of thepre-stored critical area is consistent with a size of the coordinateframe of the facial part.

For example, after the centers of the pre-stored critical area and thecoordinate frame of the facial part are coincided, the critical area iszoomed, so that the size of critical area is substantially the same asthe size of the coordinate frame of the facial part.

By translating and zooming the pre-stored critical area, the pre-storedcritical area may match with the critical area in the facial part, toobtain the initial coordinate frame data of the critical area in theframe of image, bringing a small amount of computation and simpleoperations.

In S208, obtaining coordinate frame data of the critical area accordingto the initial coordinate frame data of the critical area.

In one embodiment, the coordinate frame data of the critical area may beobtained according to the initial coordinate frame data of the criticalarea by using a facial critical area positioning process.

For example, the facial critical area positioning process refers toobtaining coordinate frame data of the critical area when a face imageand initial coordinate frame data of the critical area are input. Thecoordinate frame data of the critical area refer to two-dimensionalcoordinates of multiple points.

Facial critical area positioning process is further positioning theeyes, the eyebrows, the nose, the mouth, the outline, and the like of afacial part based on face detection, and positioning is performed byusing information about positions near key points and mutualrelationships among the key points. The facial critical area positioningprocess uses an algorithm based on regression, for example, facealignment by explicit shape regression. The face alignment by explicitshape regression uses a two-layer boosted regressor. The first layer has10 stages, and the second layer has 500 stages. In the two-layerstructure, each node in the first layer is cascading of 500 weakclassifiers, that is, a regressor in the second layer. In the regressorin the second layer, features remain unchanged, and in the first layer,features change. In the first layer, an output of each node is an inputof a previous node.

A fern is used as an original regressor. The fern is a combination of Nfeatures and thresholds, to divide training samples into 2^(F) bins.Each bin corresponds to one output y_(b) that is,

$y_{b} = {\frac{1}{1 + {\beta/{\Omega_{b}}}}{\frac{\sum\limits_{i \in \Omega_{b}}^{\;}{\hat{y}}_{i}}{\Omega_{b}}.}}$

where: β is an over-fitting coefficient, and |Ω_(b)| is a quantity ofsamples in the current bin. Therefore, a final output is a linearcombination of all training samples. A shape index feature is furtherused. That is, a value of a pixel at a position of a key point isobtained according to the position of the key point and an offset, andthen a difference between two such pixels is calculated, therebyobtaining a shape index feature. As such, a local coordinate system isused instead of using a global coordinate system, which greatly enhancesrobustness of features.

In addition, facial critical area positioning may include the following(1), (2), and/or (3).

For example, in (1), multiple positioning results are obtained for aninput face image by using multiple trained positioning models. Eachpositioning result includes positions of multiple critical areas. Thepositions of the critical areas include positions of the eyes, theeyebrows, the nose, the mouth, the ears, and the outline.

Assuming that K positioning models A₁ to A_(K) are used, a set of the Kpositioning models is represented as A. An input face image is alignedwith the K positioning models, a position of a pixel in the image isrepresented by using (x, y), so that obtained K positioning results arerespectively represented as S₁, S₂, . . . , and S_(K). Each positioningresult S includes positions of L critical areas. Therefore, S may berepresented as: S={x₁, y₁, x₂, y₂, . . . , x_(L), y_(L)}.

The positioning model A may be obtained through training by using atraining set C (C₁ to C_(K)). Each training set C_(K) has a collectionof a large quantity of face image samples, and positions of L key pointsare marked in each face image sample I_(i) in the training set C_(K),that is, S_(i)={x_(i1), y_(i1), x_(i2), y_(i2), . . . , x_(iL), y_(iL)}.

The face image samples in the training sets C₁ to C_(K) may beclassified into different types according to factors such asexpressions, ages, races, or identities. In this way, the positioningmodel A may be obtained through training according to these differenttypes.

When the positioning model A is trained, an average S⁰, which isreferred to as an average key point position, of key point positions ofall samples in the training set C is first collected. |C| represents aquantity of the samples in the training set C, and the average key pointposition S⁰ may be obtained by using the following equation (1):

$\begin{matrix}{S^{0} = {\frac{1}{C}{\sum\limits_{S_{i} \in C}^{\;}{S_{i}.}}}} & (1)\end{matrix}$

For each face image sample I_(i) in the training set C, the average keypoint position S⁰ is placed in the middle of the image, then ScaleInvariant Feature Transformation (SIFT) features of key point positionsfor the average key point position S⁰ are extracted, and the extractedSIFT features are spliced to form a feature vector f_(i). In this way, aregression model may be created according to all the sample images inthe training set C, so that equation (2) is obtained as follows.

f _(i) ·A=S _(i) −S ⁰  (2).

For each input face image that needs to be positioned, first the averagekey point position S⁰ is placed in the middle of the input image, andSIFT features of key point positions for S⁰ are extracted and spliced toform a feature vector f. A positioning result set S including the Kpositioning results may be obtained by using the following equation (3).

S=S ⁰ +f·A  (3).

As such, multiple positioning results related to the key point positionsof the input image may be obtained from the multiple trained positioningmodels.

For facial critical area positioning, in (2), the obtained multiplepositioning results are evaluated, to select an optimal positioningresult from the multiple positioning results.

Positions of L key points are marked in a face image sample I_(i) in thetraining set C, that is, S_(i)={x_(i1), y_(i1), x_(i2), y_(i2), . . .x_(iL), y_(iL)}. One Boost classifier may be trained for each key point,so that L classifiers h₁, h₂, . . . , h_(L) may be obtained. The Lclassifiers may form an evaluation model E.

When a classifier is trained, the key point classifier may be trained byusing image blocks in face images of the training set C that aresufficiently close to a position of a key point (for example, distancesbetween central positions of the image blocks and the position of thekey point fall within a first preset distance) as positive samples, andusing image blocks that are sufficiently far from the position of thekey point (for example, distances between central positions of the imageblocks and the position of the key point exceed a second presetdistance) as negative samples.

When a key point positioning result S_(i) is evaluated, image blockswith a preset size centering on each key point position (x_(i), y_(j))are input to a corresponding key point classifier h_(j), so as to obtaina score h_(j)(x_(j) y_(j)). Thereby, scores of all key point classifiersfor this key point positioning result S_(j) may be obtained, and then anaverage score of the positioning result is obtained as shown in equation(4).

$\begin{matrix}{{{score}\left( S_{k} \right)} = {\frac{1}{L}{\sum\limits_{j = 1}^{L}{{h_{j}\left( {x_{kj},y_{kj}} \right)}.}}}} & (4)\end{matrix}$

A score of each of K positioning results S₁, S₂, . . . , and S_(K) maybe obtained, and an optimal positioning result S*, that is, apositioning result having a highest score, is selected as a finalpositioning result of positions of critical areas.

For facial critical area positioning, in (3), when the score of theobtained optimal positioning result S* is greater than a presetthreshold T, an evaluation model and/or a positioning model may beupdated according to the optimal positioning result.

For example, when the evaluation model is updated, an input imagecorresponding to the positioning result S* may be added to the trainingset C, positions of L key points corresponding to the positioning resultS* are used to generate a preset quantity of positive sample imageblocks and negative sample image blocks, and then the generated positivesample image blocks and negative sample image blocks are used to trainthe classifiers h₁, h₂, . . . , and h_(L) of the L key points, so as toupdate the evaluation model E. For example, the key point classifiersh₁, h₂, . . . , and h_(L) may be trained by using an online AdaBoostmethod.

When the positioning model is updated and when it is determined that thenew positioning result S* exceeding the preset threshold exists, a typeof a positioning model corresponding to the positioning result S* isdetermined. For example, the type of the S* may be searched for by usingan online K mean method based on a SIFT feature vector f correspondingto the positioning result S*. If it is determined that S* belongs to aparticular type A_(k) in the currently existing K positioning models, S*is added to the training set C_(k) corresponding to A_(k), and thepositioning model A_(k) is trained again by using the method fortraining a positioning model described above, so as to update thepositioning model A_(k).

If it is determined that S* does not belong to any type in the currentlyexisting K types of positioning models, a corresponding training setC_(K+1) is created. When a quantity of samples in the newly addedtraining set C_(K+1) exceeds a threshold, the training set C_(K+1) isused to train a new positioning model A_(K+1). In this way, the existingK positioning models may be increased to K+1 positioning models. Afterthe positioning models are increased, positioning results increases fromthe original K positioning results to K+1 positioning results.

A matrix formed by all sample feature vectors f of the sample picturesin the training set C is represented by F, and the i^(th) row of Frepresents a feature vector the i^(th) sample. A matrix formed bymanually marked key point positions in the training set C is representedby S, and the i^(th) row of S represents key point positions of thei^(th) sample. A matrix formed by average key point positions of all thesamples in the training set C is represented by S⁰, and the i^(th) rowof S⁰ represents an average key point position of the i^(th) sample. Theexisting positioning model A before update satisfies the followingequation:

F·A=S−S ⁰.

where A may be solved in a least square manner:

A=(F ^(T) F)⁻¹ ·F·(S−−S ⁰).

Covariance matrices are:

Cov_(xx) =F ^(T) F,

and

Cov_(xy) =F·(S−S ⁰).

Elements in the m^(th) row and the n^(th) column of Cov_(xx) andCov_(xy) may be represented as:

${{{Cov}_{xx}\left( {m,n} \right)} = {\sum\limits_{S_{i} \in C}^{\;}{f_{im}{f_{i\; n}\left( {m,n} \right)}}}},{and}$${{Cov}_{xy}\left( {m,n} \right)} = {\sum\limits_{S_{i} \in C}^{\;}{{f_{im}\left( {{Sin} - S_{i\; n}^{0}} \right)}.}}$

where f_(in) represents a value of the m^(th) dimension of the featurevector of the i^(th) sample in the training set C, Sin represents avalue of the n^(th) dimension of the manually marked key point positionsof the i^(th) sample in the training set C, and S_(in) ⁰ represents avalue of the n^(th) dimension of the average key point position of thei^(th) sample in the training set C.

When the sample s* is newly added, elements of the covariance matricesmay be updated as the following equations:

${{{Cov}_{xx}\left( {m,n} \right)} = {{\sum\limits_{S_{i} \in C}^{\;}{f_{im}f_{i\; n}}} + {f_{m}^{*}f_{n}^{*}}}},{and}$${{Cov}_{xy}\left( {m,n} \right)} = {{\sum\limits_{S_{i} \in C}^{\;}{f_{im}\left( {{Sin} - S_{i\; n}^{0}} \right)}} + {{f_{m}^{*}\left( {S_{n}^{*} - S_{n}^{*0}} \right)}.}}$

where f*_(m) represents a value of the m^(th) dimension of a featurevector of the newly added sample, S*_(n) represents a value of then^(th) dimension of manually marked key point positions of the newlyadded sample, and S*_(n) ⁰ represents a value of the n^(th) dimension ofan average key point position of the newly added sample.

The coordinate frame data of the critical area are obtained according tothe initial coordinate frame data of the critical area by using theforegoing facial critical area positioning process.

In S210, accessing a next frame of image in the video file.

For example, a next frame of image adjacent to a previous processedframe of image in the video file is access.

In S212, using coordinate frame data of the critical area in a previousframe of image as initial coordinate frame data of the critical area inthe next frame of image.

In S214, obtaining coordinate frame data of the critical area in thenext frame of image according to the initial coordinate frame data ofthe critical area in the next frame of image.

As such, the coordinate frame data of the critical area in the nextframe of image may be obtained according to the initial coordinate framedata of the critical area in the next frame of image by using a facialcritical area positioning process.

In S216, determining whether processing of the video file is completed,if the processing of the video file is completed, the method ends,otherwise, return to S210.

For example, S210 to S214 may be repeatedly performed, until anapplication exits or the processing of the video file is completed.

The critical areas include points of five facial features. The points offive facial features include the eyes, the eyebrows, the nose, themouth, and the ears. By using the points of five facial features fortracking, the computation amount is small, and tracking efficiency canbe improved.

By means of the disclosed facial critical area tracking method, initialcoordinate frame data of critical area are configured by using acoordinate frame data of the facial part, and then coordinate frame dataof the critical area are obtained according to the initial coordinateframe data of the critical area; and an adjacent next frame of image isaccess, the coordinate frame data of the critical area in the previousframe of image are used as initial coordinate frame data of the criticalarea in the next frame of image, to obtain coordinate frame data of thecritical area in the next frame of image. In this manner, detection of aface detector is skipped, and efficiency of tracking of critical areascan be improved.

In addition, because a data processing capability of a mobile terminalis limited, by using the disclosed facial critical area tracking method,a large amount of computation can be avoided, thereby facilitating themobile terminal to rapidly track a face, and improving efficiency oftracking of critical areas.

In an embodiment, in the disclosed facial critical area tracking method,denoising processing may be performed, after a frame of image or anadjacent next frame of image in the video file is access, denoisingprocessing on a frame of image that has been access. Clarity of theimage is improved by using denoising processing, thereby facilitatingmore accurate tracking of the face.

For example, denoising processing may be performed on a access frame ofimage by using a weighted averaging method. That is, all pixels in theimage are processed by means of weighted averaging.

An implementation process of the facial critical area tracking method isdescribed below in combination with a specific application scenario. Anexample in which critical areas are points of five facial features isused. As shown in FIG. 4, a frame of image in a video file is accessed,a position of a facial part in the frame of image is detected, aposition 410 of coordinate frame of a facial part is obtained, and acenter of pre-stored critical area 420 is aligned with a center of theposition 410 of the coordinate frame of the facial part. As shown inFIG. 5, after the center of the pre-stored critical area 420 is alignedwith the center of the position 410 of the coordinate frame of thefacial part, the pre-stored critical area 420 is zoomed, so that a sizeof the critical area is the same as a size of the coordinate frame ofthe facial part, thereby obtaining initial coordinate frame data of thecritical area. As shown in FIG. 6, coordinate frame data of the criticalareas, that is, coordinate positions of the points of five facialfeatures, as shown by cross points “x” in FIG. 6, are obtained accordingto the initial coordinate frame data of the critical areas. Then anadjacent next frame of image in the video file is access. The coordinateframe data of the critical areas in the previous frame of image are usedas initial coordinate frame data of the critical areas in the next frameof image. Coordinate frame data of the critical areas in the next frameof image are obtained according to the initial coordinate frame data ofthe critical areas in the next frame of image.

FIG. 7 is a structural block diagram of an exemplary facial criticalarea tracking apparatus according to various embodiments of presentdisclosure. As shown in FIG. 7, a facial critical area trackingapparatus runs on a terminal, and includes a reader 702, a detector 704,a configuration device 706, and an obtaining device 708.

The reader 702 is configured to access a frame of image in a video file.

For example, the video file may be an on-line video file or a video filedownloaded on the terminal. The online video file may be played whilebeing access. The video file downloaded on the terminal may also beplayed while being access.

The detector 704 is configured to detect a position of a facial part inthe frame of image, to obtain a coordinate frame data of the facialpart.

In one embodiment, the detector 704 detects the position of the face inthe frame of image by using a face detection process, to obtain thecoordinate frame data of the facial part.

For example, in the face detection process, a position of a rectangularcoordinate frame of a facial part can be detected when an imageincluding a picture of the face is input.

The configuration device 706 is configured to configure initialcoordinate frame data of the critical area in the facial part accordingto the coordinate frame data of the facial part.

In one embodiment, the configuration device 706 is further configuredto: align a center of pre-stored critical area with a center of thecoordinate frame of the facial part by translating the pre-storedcritical area; and zoom the pre-stored critical area, so that a size ofthe pre-stored critical area is consistent with a size of the coordinateframe of the facial part.

For example, the pre-stored critical area has a center, and thecoordinate frame data of the facial part also has a center. The centerof the pre-stored critical area is coincided with the center of thecoordinate frame data of the facial part. That is, the centers arealigned with each other. After the centers of the pre-stored criticalarea and the coordinate frame of the facial part are coincided, thecritical area is zoomed, so that the size of critical area is the sameas the size of the coordinate frame of the facial part. By translatingand zooming the critical area, the pre-stored critical area may matchwith the position of the critical area of the facial part, to obtain theinitial coordinate frame data of the critical area in the frame ofimage, providing a small computation amount and simple operations.

The obtaining device 708 is configured to obtain coordinate frame dataof the critical areas according to the initial coordinate frame data ofthe critical areas.

In one embodiment, the obtaining device 708 is further configured toobtain the coordinate frame data of the critical areas according to theinitial coordinate frame data of the critical areas by using a facialcritical area positioning process.

For example, the facial critical area positioning process may includeobtaining coordinate frame data of the critical areas when a face imageand initial coordinate frame data of the critical areas are input. Thecoordinate frame data of the critical area refer to two-dimensionalcoordinates of multiple points.

The following process is repeatedly performed.

The reader 702 is further configured to access an adjacent next frame ofimage in the video file.

For example, the next frame of image adjacent to a previous processedframe of image in the video file is access.

The configuration device 706 is further configured to use coordinateframe data of the critical areas in a previous frame of image as initialcoordinate frame data of the critical areas in the adjacent next frameof image.

The obtaining device 708 is further configured to obtain coordinateframe data of the critical areas in the adjacent next frame of imageaccording to the initial coordinate frame data of the critical areas inthe adjacent next frame of image.

In one embodiment, the obtaining device 708 is further configured toobtain the coordinate frame data of the critical areas in the adjacentnext frame of image according to the initial coordinate frame data ofthe critical areas in the adjacent next frame of image by using a facialcritical area positioning process.

The foregoing process is repeatedly performed, until an applicationexits or processing of the video file is completed.

The critical area may include, for example, five facial features. Thefive facial features include the eyes, the eyebrows, the nose, themouth, and the ears. By using the five facial features for tracking, acomputation amount is small, and tracking efficiency can be improved.Although any number of facial features may be selected and used in thepresent disclosure for the facial critical area tracking.

In the disclosed facial critical area tracking apparatus, initialcoordinate frame data of the critical area in the facial part areconfigured by using a coordinate frame data of the facial part, and thencoordinate frame data of the critical areas are obtained according tothe initial coordinate frame data of the critical areas; and an adjacentnext frame of image is accessed, the coordinate frame data of thecritical areas in the previous frame of image are used as initialcoordinate frame data of the critical areas in the adjacent next frameof image, to obtain coordinate frame data of the critical areas in theadjacent next frame of image. In this way, detection of a face detectoris skipped, and efficiency of tracking of critical area can be improved.

FIG. 8 is a structural block diagram of another exemplary facialcritical area tracking apparatus according to various embodiments of thepresent disclosure. As shown in FIG. 8, a facial critical area trackingapparatus runs on a terminal, and in addition to the reader 702, thedetector 704, the configuration device 706, and the obtaining device708, the apparatus further includes a denoiser 710.

The denoiser 710 is configured to perform, after a frame of image or anadjacent next frame of image in the video file is accessed, denoisingprocessing on a frame of image that has been accessed. Clarity of theimage is improved by using denoising processing, thereby facilitatingmore accurate tracking of the facial critical area.

For example, denoising processing may be performed on an accessed frameof image by using a weighted averaging method. That is, all pixels inthe image are processed by means of weighted averaging.

A person of ordinary skill in the art may understand that all or some ofthe processes in the foregoing embodiments may be implemented by acomputer program instructing relevant hardware. The program may bestored in a non-transitory computer readable storage medium. When theprogram is executed, the processes in the foregoing embodiments of themethods may be performed. The storage medium may be a magnetic disk, anoptical disc, a read-only memory (ROM), or the like.

The embodiments described above merely explain some implementations ofthe present disclosure. Though the descriptions are specific anddetailed, the embodiments should not thereby be understood aslimitations to the patentable scope of the present disclosure. It shouldbe noted that, without departing from the concepts of the presentdisclosure, a person of ordinary skill in the art may still make severalvariations and improvements, all of which shall fall within theprotection scope of the present disclosure. Therefore, the protectionscope of the present disclosure shall subject to the accompanyingclaims.

What is claimed is:
 1. A facial critical area tracking method,comprising: accessing a frame of image in a video file; obtainingcoordinate frame data of a facial part in the image by detecting aposition of the facial part in the frame of the image; determininginitial coordinate frame data of a critical area in the facial partaccording to the coordinate frame data of the facial part; obtainingcoordinate frame data of the critical area according to the initialcoordinate frame data of the critical area in the facial part; accessingan adjacent next frame of image in the video file; obtaining initialcoordinate frame data of the critical area in the facial part for theadjacent next frame of image by using the coordinate frame data of thecritical area in the frame; and obtaining coordinate frame data of thecritical area for the adjacent next frame of image according to theinitial coordinate frame data of the critical area in the adjacent nextframe of image.
 2. The method according to claim 1, further including:obtaining coordinate frame data of each of a plurality of frames ofimage, wherein the plurality of frames form an image of the criticalarea of the facial part.
 3. The method according to claim 1, wherein thestep of detecting a position of a facial part in the frame of image isimplemented by using an AdaBoost algorithm in combination with one ofHaar-like features, Multi-scale Block based Local Binary Patterns(MBLBP) features, and Multi-scale Structured Ordinal Features (MSOF). 4.The method according to claim 1, wherein the step of determining aninitial coordinate frame data of a critical area comprises: aligning apre-stored critical area with the coordinate frame of the facial part byshifting the pre-stored critical area with respect to the coordinateframe of the facial part; and maintaining the pre-stored critical area asame size as for the coordinate frame of the facial part, by zooming thepre-stored critical area.
 5. The method according to claim 1, wherein:the coordinate frame data of the critical area further includetwo-dimensional coordinates of multiple points of the critical area; andthe coordinate frame data of the critical area are obtained usinginformation about coordinate frame data near the critical area andmutual relationships among critical areas.
 6. The method according toclaim 1, wherein the critical area includes a facial feature, includingat least one of eyes, eyebrows, nose, mouth, and ears.
 7. The methodaccording to claim 1, further comprising: performing a denoising processwhile accessing each of the frame of image and the adjacent next frameof image.
 8. A terminal, comprising: a memory, storing computer readableinstructions, and a processor, coupled to the memory and configured for:accessing a frame of image in a video file; obtaining coordinate framedata of a facial part in the image by detecting a position of the facialpart in the frame of the image; determining initial coordinate framedata of a critical area in the facial part according to the coordinateframe data of the facial part; obtaining coordinate frame data of thecritical area according to the initial coordinate frame data of thecritical area in the facial part; accessing an adjacent next frame ofimage in the video file; obtaining initial coordinate frame data of thecritical area in the facial part for the adjacent next frame of image byusing the coordinate frame data of the critical area in the frame; andobtaining coordinate frame data of the critical area for the adjacentnext frame of image according to the initial coordinate frame data ofthe critical area in the adjacent next frame of image.
 9. The terminalaccording to claim 8, wherein the processor is further configured for:obtaining coordinate frame data of each of a plurality of frames ofimage, wherein the plurality of frames form an image of the criticalarea of the facial part.
 10. The terminal according to claim 8, whereinthe processor is further configured for: detecting the position of thefacial part in the frame of image by using an AdaBoost algorithm incombination with one of Haar-like features, Multi-scale Block basedLocal Binary Patterns (MBLBP) features, and Multi-scale StructuredOrdinal Features (MSOF).
 11. The terminal according to claim 8, whereinthe processor is further configured for: determining the initialcoordinate frame data of the critical area by: aligning a pre-storedcritical area with the coordinate frame of the facial part by shiftingthe pre-stored critical area with respect to the coordinate frame of thefacial part; and maintaining the pre-stored critical area a same size asfor the coordinate frame of the facial part, by zooming the pre-storedcritical area.
 12. The terminal according to claim 8, wherein: thecoordinate frame data of the critical area further includetwo-dimensional coordinates of multiple points of the critical area; andthe coordinate frame data of the critical area are obtained usinginformation about coordinate frame data near the critical area andmutual relationships among critical areas.
 13. The terminal according toclaim 8, wherein the critical area includes a facial feature, includingat least one of eyes, eyebrows, nose, mouth, and ears.
 14. The terminalaccording to claim 8, wherein the processor is further configured for:performing a denoising process while accessing each of the frame ofimage and the adjacent next frame of image.
 15. A non-transitorycomputer readable storage medium storing computer-executableinstructions for, when being executed, one or more processors to performa facial critical area tracking method, the method comprising: accessinga frame of image in a video file; obtaining coordinate frame data of afacial part in the image by detecting a position of the facial part inthe frame of the image; determining initial coordinate frame data of acritical area in the facial part according to the coordinate frame dataof the facial part; obtaining coordinate frame data of the critical areaaccording to the initial coordinate frame data of the critical area inthe facial part; accessing an adjacent next frame of image in the videofile; obtaining initial coordinate frame data of the critical area inthe facial part for the adjacent next frame of image by using thecoordinate frame data of the critical area in the frame; and obtainingcoordinate frame data of the critical area for the adjacent next frameof image according to the initial coordinate frame data of the criticalarea in the adjacent next frame of image.
 16. The non-transitorycomputer readable storage medium according to claim 15, wherein the oneor more processors are further configured for: obtaining coordinateframe data of each of a plurality of frames of image, wherein theplurality of frames form an image of the critical area of the facialpart.
 17. The non-transitory computer readable storage medium accordingto claim 15, wherein the one or more processors are further configuredfor: detecting the position of the facial part in the frame of image byusing an AdaBoost algorithm in combination with one of Haar-likefeatures, Multi-scale Block based Local Binary Patterns (MBLBP)features, and Multi-scale Structured Ordinal Features (MSOF).
 18. Thenon-transitory computer readable storage medium according to claim 15,wherein the one or more processors are further configured for:determining the initial coordinate frame data of the critical area by:aligning a pre-stored critical area with the coordinate frame of thefacial part by shifting the pre-stored critical area with respect to thecoordinate frame of the facial part; and maintaining the pre-storedcritical area a same size as for the coordinate frame of the facialpart, by zooming the pre-stored critical area.
 19. The non-transitorycomputer readable storage medium according to claim 15, wherein: thecoordinate frame data of the critical area further includetwo-dimensional coordinates of multiple points of the critical area; andthe coordinate frame data of the critical area are obtained usinginformation about coordinate frame data near the critical area andmutual relationships among critical areas.
 20. The non-transitorycomputer readable storage medium according to claim 15, wherein the oneor more processors are further configured for: performing a denoisingprocess while accessing each of the frame of image and the adjacent nextframe of image.